import Http from '../http';

//字典
export const getList = function (queryModel: any) {
    return Http.get('/DictData/index', queryModel)
}
export const getEdit = function (id: number) {
    return Http.get('/DictData/AddOrEdit', { id: id })
}
export const postAdd = function (from: any) {
    return Http.post('/DictData/Create', from)
}
export const putEdit = function (from: any) {
    return Http.put('/DictData/Edit', from)
}
export const delOne = function (id: number) {
    return Http.delete('/DictData/Delete', { id: id })
}

///类别
export const getCatList = function (queryModel: any) {
    return Http.get('/DictCat/index', queryModel)
}
export const getCatEdit = function (id: number) {
    return Http.get('/DictCat/AddOrEdit', { id: id })
}
export const postCatAdd = function (from: any) {
    return Http.post('/DictCat/Create', from)
}
export const putCatEdit = function (from: any) {
    return Http.put('/DictCat/Edit', from)
}
export const delCatOne = function (id: number) {
    return Http.delete('/DictCat/Delete', { id: id })
}